package xju_3_4.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MyController {

    @RequestMapping("/exception")
    public String test7() {
        int a =  10/0;
        return "hello";
    }

    @GetMapping("/interceptor")
    public String interceptor() {
        System.out.println("通过拦截器进来了");
        return "hello";
    }
}
